/*
 * Wazuh VD send report.
 * Copyright (C) 2015, Wazuh Inc.
 * March 9, 2023.
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General Public
 * License (version 2) as published by the FSF - Free Software
 * Foundation.
 */

#ifndef _CLEAN_SEND_REPORT_TEST_HPP
#define _CLEAN_SEND_REPORT_TEST_HPP

#include "MockOsDataCache.hpp"
#include "MockRemediationDataCache.hpp"
#include "policyManager.hpp"
#include "socketServer.hpp"
#include "gtest/gtest.h"
#include <filesystem>

// External shared pointers definitions
extern std::shared_ptr<MockOsDataCache> spOsDataCacheMock;
extern std::shared_ptr<MockRemediationDataCache> spRemediationDataCacheMock;

/**
 * @brief SendReport test class.
 *
 */
class ClearSendReportTest : public ::testing::Test
{
protected:
    /**
     * @brief Construct a new ClearSendReportTest object
     *
     */
    ClearSendReportTest() = default;

    /**
     * @brief Destroy the ClearSendReportTest object
     *
     */
    ~ClearSendReportTest() override = default;

    /**
     * @brief Fake server to receive Wazuh-DB queries.
     *
     */
    std::shared_ptr<SocketServer<Socket<OSPrimitives, SizeHeaderProtocol>, EpollWrapper>> m_fakeWdb;

    /**
     * @brief Set the environment for testing.
     *
     */
    void SetUp() override {}

    /**
     * @brief Clean the environment after testing.
     *
     */
    void TearDown() override
    {
        spOsDataCacheMock.reset();
        spRemediationDataCacheMock.reset();
    }
};

#endif // _CLEAN_SEND_REPORT_TEST_HPP
